package cn.edu.sjtu.se.dslab.component.design.generate.element;

import java.util.Map;

public class Line extends PageElement {
	
	public static final String START_X_COORDINATE = "start_x_coordinate";
	public static final String START_Y_COORDINATE = "start_y_coordinate";
	public static final String END_X_COORDINATE = "end_x_coordinate";
	public static final String END_Y_COORDINATE = "end_y_coordinate";

	private int startXCoordinate;
	private int startYCoordinate;
	private int endXCoordinate;
	private int endYCoordinate;

	public Line(Map<String, String> elementMap) {
		super.setElementName(elementMap.get(ELEMENT_NAME));
		super.setElementType(ElementType.valueOf(elementMap.get(ELEMENT_TYPE).toUpperCase()));
		startXCoordinate = Integer.parseInt(elementMap.get(START_X_COORDINATE));
		startYCoordinate = Integer.parseInt(elementMap.get(START_Y_COORDINATE));
		endXCoordinate = Integer.parseInt(elementMap.get(END_X_COORDINATE));
		endYCoordinate = Integer.parseInt(elementMap.get(END_Y_COORDINATE));
	}

	public int getStartXCoordinate() {
		return startXCoordinate;
	}

	public void setStartXCoordinate(int startXCoordinate) {
		this.startXCoordinate = startXCoordinate;
	}

	public int getStartYCoordinate() {
		return startYCoordinate;
	}

	public void setStartYCoordinate(int startYCoordinate) {
		this.startYCoordinate = startYCoordinate;
	}

	public int getEndXCoordinate() {
		return endXCoordinate;
	}

	public void setEndXCoordinate(int endXCoordinate) {
		this.endXCoordinate = endXCoordinate;
	}

	public int getEndYCoordinate() {
		return endYCoordinate;
	}

	public void setEndYCoordinate(int endYCoordinate) {
		this.endYCoordinate = endYCoordinate;
	}
	



}
